using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class AuthData
{
    //运行时间记录天数
    public int runtime;
    ///游戏名字
    public string gameName;
    //授权起如时间
    public string startTime;
    //授权到期时间
    public string endTime;
    //授权总时间天数
    public int totalTime;
    //控制码（随机）
    public string control;
    //授权码
    public string authCode;
    //机器码
    public string deviceCode;
    // 验证码
    public string checkCode;

    public string datas
    {
        get
        {
            return runtime + gameName + startTime + endTime + totalTime + control + authCode + deviceCode + "KF";
        }
    }
    bool isGame
    {
        get
        {
            return Application.productName == gameName;
        }
    }
    public bool isCheck
    {
        get
        {
            if (isGame)
                return AuSecurity.Get_Md_32(datas) == checkCode;

            return false;
        }
    }
}
